<!--
 * @Author: wangming
 * @Date: 2021-04-01 17:15:13
 * @LastEditors: wangming
 * @LastEditTime: 2022-01-13 10:52:08
 * @Description: file content
-->
<template>
  <div>
    <el-form-item label="树形结构" class="tr">
      <el-switch v-model="value.__config.treeWalker"></el-switch>
    </el-form-item>
    <el-form-item :label="c_label" class="tr">
      <el-switch v-model="value.__config.defaultSelf"></el-switch>
    </el-form-item>
  </div>
</template>
<script>
import basicmixins from "./basicmixins";
let DESC = {
  hlPersonnel: "默认当前用户",
  hlDepartment: "默认当前用户主部门",
};
export default {
  mixins: [basicmixins],
  computed: {
    c_label() {
      return DESC[this.value.tagName];
    },
  },
  watch: {
    "value.__config.treeWalker": {
      handler(val) {
        if (val) {
          this.$set(this.value.__config, "deptRange", false);
        }
      },
      immediate: true,
    },
  },
  methods: {},
};
</script>

<style lang="scss" scoped>
::v-deep .el-form-item--mini.el-form-item,
.el-form-item--small.el-form-item {
  margin-bottom: 10px;
}
</style>
